package com.domo.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT" ,fallback = PaymentFallbackService.class)
public interface PaymentHystrixService {

    @RequestMapping(value = "/payment/hystrix/ok/{id}",method = RequestMethod.GET)
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @RequestMapping(value = "/payment/hystrix/timeout/{id}",method = RequestMethod.GET)
    public String paymentInfo_TimeOut(@PathVariable("id") Integer id);
}
